<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
我的模板html内容
<br/>{{ my_str }}
<br/>{{ my_int }}
<br/>{{ my_array }}
<br/>{{ my_dict }}


<br/> my_int + 10 的和为：{{ my_int + 10 }}
<br/> my_int + my_array第0个值的和为：{{ my_int + my_array[0] }}
<br/> my_array 第0个值为：{{ my_array[0] }}
<br/> my_array 第1个值为：{{ my_array.1 }}
<br/> my_dict 中 name 的值为：{{ my_dict['name'] }}
<br/> my_dict 中 age 的值为：{{ my_dict.age }}
<br/> {{ "hello world" | reverse | upper }}

<p>{{ '<em>hello</em>' }}</p>
<p>{{ '<em>hello</em>' | safe }}</p>
<p>{{ 'heLLo' | capitalize }}</p>
<p>{{ 'HELLO' | lower }}</p>
<p>{{ 'hello' | upper }}</p>
<p>{{ 'hello how are you' | title }}</p>
<p>{{ 'olleh' | reverse }}</p>
<p>{{ '%s is %d' | format('name',17) }}</p>
<p>{{ '<em>hello</em>' | striptags }}</p>
<p>{{ 'how are you?' | truncate(9,killwords=True,leeway=0)}}</p>
<p>{{ 'how are you?' | truncate(7,killwords=True)}}</p>

<p>{{ [1,2,3,4,5,6] | first }}</p>
<p>{{ [1,2,3,4,5,6] | last }}</p>
<p>{{ [1,2,3,4,5,6] | length }}</p>
<p>{{ [1,2,3,4,5,6] | sum }}</p>
<p>{{ [6,2,3,1,5,4] | sort }}</p>


{% filter upper %}
    #一大堆文字dsggFSGSGS#
{% endfilter %}

<br/> my_array 原内容：{{ my_array }}
<br/> my_array 反转：{{ my_array | lireverse }}

{#{%if user.is_logged_in() %}#}
{#    <a href='/logout'>Logout</a>#}
{#{% else %}#}
{#    <a href='/login'>Login</a>#}
{#{% endif %}#}

{#{% if comments | length > 0 %}#}
{#    There are {{ comments | length }} comments#}
{#{% else %}#}
{#    There are no comments#}
{#{% endif %}#}
<br/>
{% for item in my_list if item.id != 5 %}
    {% if loop.index == 1 %}
        <li style="background-color: orange">{{ item.value }}</li>
    {% elif loop.index == 2 %}
        <li style="background-color: green">{{ item.value }}</li>
    {% elif loop.index == 3 %}
        <li style="background-color: red">{{ item.value }}</li>
    {% else %}
        <li style="background-color: purple">{{ item.value }}</li>
    {% endif %}
{% endfor %}

</body>
</html>